package com.example.service.impl;

import com.example.mapper.AopMapper;
import com.example.pojo.OperateLog;
import com.example.pojo.PageResult;
import com.example.service.AopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AopServiceimpl implements AopService {
    @Autowired
    private AopMapper aopMapper;
    @Override
    public PageResult findPage(Integer page, Integer pageSize) {
        Long total = aopMapper.find();
        Integer start = (page-1)*pageSize;
        List<OperateLog> rows = aopMapper.logPage(start, pageSize);
        return new PageResult(total,rows);
    }
}
